<template>
  <div class="MyPaginationBox">
    <!-- 这里课程中配:current-page.sync="currentPage" 但是用在这报错-->
    <el-pagination
      background
      layout="prev, pager, next,total,jumper"
      :total="total"
      :page-size="pageSize"
      
      @current-change="changePage"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  props: {
    total: {
      type: Number,
      default: 100,
    },
    pageSize: {
      type: Number,
      default: 10,
    },
    currentPage: {
      type: Number,
      default: 1,
    },
  },
  methods:{
    changePage(page){
        this.$emit('changePage',page)
    }
  }
};
</script>

<style lang="less" scoped>
.MyPaginationBox {
  text-align: center;
  margin: 20px;
}
</style>
